<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8" isELIgnored="false"%>
<html>
<head>
<title>Mua sách</title>
</head>
<body>
	<input type="hidden" id="bookId" value="${bookInfo.id}" />
	<div class="list-view">
		<div class="pr-head">
			<span class="pr-detail-name">Mua Sách</span>
		</div>
		<div class="pr-detail">
			<div class="pr-profile-left">
				<div class="pr-profile-menu height690">
					<a class="pr-profile-menu-item edit"><i></i>Thanh toán tiền</a>
				</div>
			</div>
			<div class="pr-profile-right right-content-large">
				<div id="" class="pr-profile-page">
					<span class="pr-text separator"> <span class="title-s-text">
							<span>Thông tin sách</span>
							<div class="book-info">
								<div class="pr-img order-book-style"
									style="background-image: url('getBookImage?bookId=${bookInfo.id}')"></div>
								<div class="publisherInfo">
									<ul>
										<li><span style="float: left;">Tên sách: </span> <span
											class="pr-name">${bookInfo.name }</span></li>
										<li><span>Tác giả: </span> ${bookInfo.author }</li>
										<li><span>Nhà xuất bản: </span> ${publisherInfo.name }</li>
										<li><span>Năm xuất bản: </span> <fmt:formatDate
												pattern="dd/MM/yyyy" value="${bookInfo.datePublish}" /></li>
										<li><span>Tái bản lần thứ: </span>
											${bookkInfo.numberRepublish }</li>
									</ul>
								</div>
							</div>
						</span>
					</span> 
					<span class="pr-text separator"> <span class="title-s-text">
						<span>Loại hình thanh toán</span></span>
						<p class="error" id="error_message_payment"></p>
						<p>Quý khách vui lòng chọn loại hình thanh toán trực tuyến:</p> 
						<span class="acc-title-text left">Loại hình:</span>
						<div id="paymentId">
							<div class="column-paypal left">
								<div class="paypal-logo"></div>
								<input type="radio" class="payment-radio" name="payment" value="1" /><span>Paypal</span>
							</div>
							<div class="column-ngan-luong left">
								<div class="ngan-luong-logo"></div>
								<input type="radio" class="payment-radio" name="payment" value="2" /><span>Ngân
									Lượng</span>
							</div>
						</div>
						<div style="display: none;" class="message-box-buying">
							<div id="remainAmoount"></div>
							<div id="messageErrorBuy"></div>
						</div>
						<div class="button-payment">
							<input type="button" class="popup-button center-button"
								value="Thanh toán" onclick="payingBook();" />
						</div>
					</span>
				</div>

			</div>
		</div>
	</div>
	<jsp:include page="nap-tien.jsp"/>	
	<script type="text/javascript">
		$(document).ready(function(){
			$(".payment-radio").click(function(){
				$(".message-box-buying").hide();
			})
		});
	</script>
</body>
</html>